package com.finer.controller;

import com.finer.entity.ResponseMessage;
import com.finer.service.SysLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author 罗梦杰
 * date 2024/10/23 14:40
 * @version 1.0
 */
@RestController
@Slf4j
@CrossOrigin
public class SysLogController {
    @Resource
    private SysLogService sysLogService;

    @RequestMapping("queryLogByPage")
    public ResponseMessage queryLogByPage(@RequestParam Map map){
        log.info("SysLogController queryLogByPage param:{}",map);
        ResponseMessage msg = sysLogService.queryLogByPage(map);
        return msg;
    }
    @RequestMapping("delLogById")
    public ResponseMessage delLogById(@RequestParam Integer id){
        log.info("SysLogController delLogById param:{}",id);
        ResponseMessage msg = sysLogService.deleteById(id);
        return msg;
    }

}
